home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / NetSprocket.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  15.5 KB  |  556 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        NetSprocket.h
  3.  
  4.      Contains:    Games Sprockets: NetSprocket interfaces
  5.  
  6.      Version:    Technology:    NetSprocket 1.0.2
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1996-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __NETSPROCKET__
  19. #define __NETSPROCKET__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __EVENTS__
  25. #include <Events.h>
  26. #endif
  27.  
  28. #include <OpenTransport.h>
  29. #include <OpenTptInternet.h>
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=power
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53.  
  54. enum {
  55.     kNSpMaxPlayerNameLen        = 31,
  56.     kNSpMaxGroupNameLen            = 31,
  57.     kNSpMaxPasswordLen            = 31,
  58.     kNSpMaxGameNameLen            = 31,
  59.     kNSpMaxDefinitionStringLen    = 255
  60. };
  61.  
  62.  
  63. /* NetSprocket basic types */
  64. typedef struct OpaqueNSpGameReference*     NSpGameReference;
  65. typedef struct OpaqueNSpProtocolReference*  NSpProtocolReference;
  66. typedef struct OpaqueNSpProtocolListReference*  NSpProtocolListReference;
  67. typedef struct OpaqueNSpAddressReference*  NSpAddressReference;
  68. typedef SInt32                             NSpEventCode;
  69. typedef SInt32                             NSpGameID;
  70. typedef SInt32                             NSpPlayerID;
  71. typedef NSpPlayerID                     NSpGroupID;
  72. typedef UInt32                             NSpPlayerType;
  73. typedef SInt32                             NSpFlags;
  74. /* Individual player info */
  75.  
  76. struct NSpPlayerInfo {
  77.     NSpPlayerID                     id;
  78.     NSpPlayerType                     type;
  79.     Str31                             name;
  80.     UInt32                             groupCount;
  81.     NSpGroupID                         groups[1];
  82. };
  83. typedef struct NSpPlayerInfo NSpPlayerInfo;
  84.  
  85. typedef NSpPlayerInfo *                    NSpPlayerInfoPtr;
  86. /* list of all players */
  87. struct NSpPlayerEnumeration {
  88.     UInt32                             count;
  89.     NSpPlayerInfoPtr                 playerInfo[1];
  90. };
  91. typedef struct NSpPlayerEnumeration NSpPlayerEnumeration;
  92.  
  93. typedef NSpPlayerEnumeration *            NSpPlayerEnumerationPtr;
  94. /* Individual group info */
  95. struct NSpGroupInfo {
  96.     NSpGroupID                         id;
  97.     UInt32                             playerCount;
  98.     NSpPlayerID                     players[1];
  99. };
  100. typedef struct NSpGroupInfo NSpGroupInfo;
  101.  
  102. typedef NSpGroupInfo *                    NSpGroupInfoPtr;
  103. /* List of all groups */
  104. struct NSpGroupEnumeration {
  105.     UInt32                             count;
  106.     NSpGroupInfoPtr                 groups[1];
  107. };
  108. typedef struct NSpGroupEnumeration NSpGroupEnumeration;
  109.  
  110. typedef NSpGroupEnumeration *            NSpGroupEnumerationPtr;
  111. /* Topology types */
  112. typedef UInt32                             NSpTopology;
  113.  
  114. enum {
  115.     kNSpClientServer            = 0x00000001
  116. };
  117.  
  118. /* Game information */
  119. struct NSpGameInfo {
  120.     UInt32                             maxPlayers;
  121.     UInt32                             currentPlayers;
  122.     UInt32                             currentGroups;
  123.     NSpTopology                     topology;
  124.     UInt32                             reserved;
  125.     Str31                             name;
  126.     Str31                             password;
  127. };
  128. typedef struct NSpGameInfo NSpGameInfo;
  129.  
  130. /* Structure used for sending and receiving network messages */
  131.  
  132. struct NSpMessageHeader {
  133.     UInt32                             version;                    /* Used by NetSprocket.  Don't touch this */
  134.     SInt32                             what;                        /* The kind of message (e.g. player joined) */
  135.     NSpPlayerID                     from;                        /* ID of the sender */
  136.     NSpPlayerID                     to;                            /* (player or group) id of the intended recipient */
  137.     UInt32                             id;                            /* Unique ID for this message & (from) player */
  138.     UInt32                             when;                        /* Timestamp for the message */
  139.     UInt32                             messageLen;                    /* Bytes of data in the entire message (including the header) */
  140. };
  141. typedef struct NSpMessageHeader NSpMessageHeader;
  142.  
  143. /* NetSprocket-defined message structures */
  144. struct NSpErrorMessage {
  145.     NSpMessageHeader                 header;
  146.     OSStatus                         error;
  147. };
  148. typedef struct NSpErrorMessage NSpErrorMessage;
  149.  
  150. struct NSpJoinRequestMessage {
  151.     NSpMessageHeader                 header;
  152.     Str31                             name;
  153.     Str31                             password;
  154.     UInt32                             theType;
  155.     UInt32                             customDataLen;
  156.     UInt8                             customData[1];
  157. };
  158. typedef struct NSpJoinRequestMessage NSpJoinRequestMessage;
  159.  
  160. struct NSpJoinApprovedMessage {
  161.     NSpMessageHeader                 header;
  162. };
  163. typedef struct NSpJoinApprovedMessage NSpJoinApprovedMessage;
  164.  
  165. struct NSpJoinDeniedMessage {
  166.     NSpMessageHeader                 header;
  167.     Str255                             reason;
  168. };
  169. typedef struct NSpJoinDeniedMessage NSpJoinDeniedMessage;
  170.  
  171. struct NSpPlayerJoinedMessage {
  172.     NSpMessageHeader                 header;
  173.     UInt32                             playerCount;
  174.     NSpPlayerInfo                     playerInfo;
  175. };
  176. typedef struct NSpPlayerJoinedMessage NSpPlayerJoinedMessage;
  177.  
  178. struct NSpPlayerLeftMessage {
  179.     NSpMessageHeader                 header;
  180.     UInt32                             playerCount;
  181.     NSpPlayerID                     playerID;
  182. };
  183. typedef struct NSpPlayerLeftMessage NSpPlayerLeftMessage;
  184.  
  185. struct NSpHostChangedMessage {
  186.     NSpMessageHeader                 header;
  187.     NSpPlayerID                     newHost;
  188. };
  189. typedef struct NSpHostChangedMessage NSpHostChangedMessage;
  190.  
  191. struct NSpGameTerminatedMessage {
  192.     NSpMessageHeader                 header;
  193. };
  194. typedef struct NSpGameTerminatedMessage NSpGameTerminatedMessage;
  195.  
  196. /* Different kinds of messages.  These can NOT be bitwise ORed together */
  197.  
  198. enum {
  199.     kNSpSendFlag_Junk            = 0x00100000,                    /* will be sent (try once) when there is nothing else pending */
  200.     kNSpSendFlag_Normal            = 0x00200000,                    /* will be sent immediately (try once) */
  201.     kNSpSendFlag_Registered        = 0x00400000                    /* will be sent immediately (guaranteed, in order) */
  202. };
  203.  
  204.  
  205. /* Options for message delivery.  These can be bitwise ORed together with each other,
  206.         as well as with ONE of the above */
  207.  
  208. enum {
  209.     kNSpSendFlag_FailIfPipeFull    = 0x00000001,
  210.     kNSpSendFlag_SelfSend        = 0x00000002,
  211.     kNSpSendFlag_Blocking        = 0x00000004
  212. };
  213.  
  214.  
  215. /* Options for Hosting Joining, and Deleting games */
  216.  
  217. enum {
  218.     kNSpGameFlag_DontAdvertise    = 0x00000001,
  219.     kNSpGameFlag_ForceTerminateGame = 0x00000002
  220. };
  221.  
  222. /* Message "what" types */
  223. /* Apple reserves all negative "what" values (anything with bit 32 set) */
  224.  
  225. enum {
  226.     kNSpSystemMessagePrefix        = (long)0x80000000,
  227.     kNSpError                    = kNSpSystemMessagePrefix | 0x7FFFFFFF,
  228.     kNSpJoinRequest                = kNSpSystemMessagePrefix | 0x00000001,
  229.     kNSpJoinApproved            = kNSpSystemMessagePrefix | 0x00000002,
  230.     kNSpJoinDenied                = kNSpSystemMessagePrefix | 0x00000003,
  231.     kNSpPlayerJoined            = kNSpSystemMessagePrefix | 0x00000004,
  232.     kNSpPlayerLeft                = kNSpSystemMessagePrefix | 0x00000005,
  233.     kNSpHostChanged                = kNSpSystemMessagePrefix | 0x00000006,
  234.     kNSpGameTerminated            = kNSpSystemMessagePrefix | 0x00000007
  235. };
  236.  
  237.  
  238. /* Special TPlayerIDs  for sending messages */
  239.  
  240. enum {
  241.     kNSpAllPlayers                = 0x00000000,
  242.     kNSpHostOnly                = (long)0xFFFFFFFF
  243. };
  244.  
  245.  
  246. /* NetSprocket Error Codes */
  247.  
  248. enum {
  249.     kNSpInitializationFailedErr    = -30360,
  250.     kNSpAlreadyInitializedErr    = -30361,
  251.     kNSpTopologyNotSupportedErr    = -30362,
  252.     kNSpPipeFullErr                = -30364,
  253.     kNSpHostFailedErr            = -30365,
  254.     kNSpProtocolNotAvailableErr    = -30366,
  255.     kNSpInvalidGameRefErr        = -30367,
  256.     kNSpInvalidParameterErr        = -30369,
  257.     kNSpOTNotPresentErr            = -30370,
  258.     kNSpOTVersionTooOldErr        = -30371,
  259.     kNSpMemAllocationErr        = -30373,
  260.     kNSpAlreadyAdvertisingErr    = -30374,
  261.     kNSpNotAdvertisingErr        = -30376,
  262.     kNSpInvalidAddressErr        = -30377,
  263.     kNSpFreeQExhaustedErr        = -30378,
  264.     kNSpRemovePlayerFailedErr    = -30379,
  265.     kNSpAddressInUseErr            = -30380,
  266.     kNSpFeatureNotImplementedErr = -30381,
  267.     kNSpNameRequiredErr            = -30382,
  268.     kNSpInvalidPlayerIDErr        = -30383,
  269.     kNSpInvalidGroupIDErr        = -30384,
  270.     kNSpNoPlayersErr            = -30385,
  271.     kNSpNoGroupsErr                = -30386,
  272.     kNSpNoHostVolunteersErr        = -30387,
  273.     kNSpCreateGroupFailedErr    = -30388,
  274.     kNSpAddPlayerFailedErr        = -30389,
  275.     kNSpInvalidDefinitionErr    = -30390,
  276.     kNSpInvalidProtocolRefErr    = -30391,
  277.     kNSpInvalidProtocolListErr    = -30392,
  278.     kNSpTimeoutErr                = -30393,
  279.     kNSpGameTerminatedErr        = -30394,
  280.     kNSpConnectFailedErr        = -30395,
  281.     kNSpSendFailedErr            = -30396,
  282.     kNSpJoinFailedErr            = -30399
  283. };
  284.  
  285.  
  286.  
  287.  
  288. /************************  Initialization  ************************/
  289. EXTERN_API_C( OSStatus )
  290. NSpInitialize                    (UInt32                 inStandardMessageSize,
  291.                                  UInt32                 inBufferSize,
  292.                                  UInt32                 inQElements,
  293.                                  NSpGameID                 inGameID,
  294.                                  UInt32                 inTimeout);
  295.  
  296.  
  297.  
  298.  
  299. /**************************  Protocols  **************************/
  300. /* Programmatic protocol routines */
  301. EXTERN_API_C( OSStatus )
  302. NSpProtocol_New                    (const char *            inDefinitionString,
  303.                                  NSpProtocolReference *    outReference);
  304.  
  305. EXTERN_API_C( void )
  306. NSpProtocol_Dispose                (NSpProtocolReference     inProtocolRef);
  307.  
  308. EXTERN_API_C( OSStatus )
  309. NSpProtocol_ExtractDefinitionString (NSpProtocolReference  inProtocolRef,
  310.                                  char *                    outDefinitionString);
  311.  
  312.  
  313. /* Protocol list routines */
  314. EXTERN_API_C( OSStatus )
  315. NSpProtocolList_New                (NSpProtocolReference     inProtocolRef,
  316.                                  NSpProtocolListReference * outList);
  317.  
  318. EXTERN_API_C( void )
  319. NSpProtocolList_Dispose            (NSpProtocolListReference  inProtocolList);
  320.  
  321. EXTERN_API_C( OSStatus )
  322. NSpProtocolList_Append            (NSpProtocolListReference  inProtocolList,
  323.                                  NSpProtocolReference     inProtocolRef);
  324.  
  325. EXTERN_API_C( OSStatus )
  326. NSpProtocolList_Remove            (NSpProtocolListReference  inProtocolList,
  327.                                  NSpProtocolReference     inProtocolRef);
  328.  
  329. EXTERN_API_C( OSStatus )
  330. NSpProtocolList_RemoveIndexed    (NSpProtocolListReference  inProtocolList,
  331.                                  UInt32                 inIndex);
  332.  
  333. EXTERN_API_C( UInt32 )
  334. NSpProtocolList_GetCount        (NSpProtocolListReference  inProtocolList);
  335.  
  336. EXTERN_API_C( NSpProtocolReference )
  337. NSpProtocolList_GetIndexedRef    (NSpProtocolListReference  inProtocolList,
  338.                                  UInt32                 inIndex);
  339.  
  340.  
  341. /* Helpers */
  342. EXTERN_API_C( NSpProtocolReference )
  343. NSpProtocol_CreateAppleTalk        (ConstStr31Param         inNBPName,
  344.                                  ConstStr31Param         inNBPType,
  345.                                  UInt32                 inMaxRTT,
  346.                                  UInt32                 inMinThruput);
  347.  
  348. EXTERN_API_C( NSpProtocolReference )
  349. NSpProtocol_CreateIP            (InetPort                 inPort,
  350.                                  UInt32                 inMaxRTT,
  351.                                  UInt32                 inMinThruput);
  352.  
  353.  
  354. /***********************  Human Interface  ************************/
  355. typedef CALLBACK_API( Boolean , NSpEventProcPtr )(EventRecord *inEvent);
  356. EXTERN_API_C( NSpAddressReference )
  357. NSpDoModalJoinDialog            (ConstStr31Param         inGameType,
  358.                                  ConstStr255Param         inEntityListLabel,
  359.                                  Str31                     ioName,
  360.                                  Str31                     ioPassword,
  361.                                  NSpEventProcPtr         inEventProcPtr);
  362.  
  363. EXTERN_API_C( Boolean )
  364. NSpDoModalHostDialog            (NSpProtocolListReference  ioProtocolList,
  365.                                  Str31                     ioGameName,
  366.                                  Str31                     ioPlayerName,
  367.                                  Str31                     ioPassword,
  368.                                  NSpEventProcPtr         inEventProcPtr);
  369.  
  370.  
  371. /*********************  Hosting and Joining  **********************/
  372. EXTERN_API_C( OSStatus )
  373. NSpGame_Host                    (NSpGameReference *        outGame,
  374.                                  NSpProtocolListReference  inProtocolList,
  375.                                  UInt32                 inMaxPlayers,
  376.                                  ConstStr31Param         inGameName,
  377.                                  ConstStr31Param         inPassword,
  378.                                  ConstStr31Param         inPlayerName,
  379.                                  NSpPlayerType             inPlayerType,
  380.                                  NSpTopology             inTopology,
  381.                                  NSpFlags                 inFlags);
  382.  
  383. EXTERN_API_C( OSStatus )
  384. NSpGame_Join                    (NSpGameReference *        outGame,
  385.                                  NSpAddressReference     inAddress,
  386.                                  ConstStr31Param         inName,
  387.                                  ConstStr31Param         inPassword,
  388.                                  NSpPlayerType             inType,
  389.                                  void *                    inCustomData,
  390.                                  UInt32                 inCustomDataLen,
  391.                                  NSpFlags                 inFlags);
  392.  
  393. EXTERN_API_C( OSStatus )
  394. NSpGame_EnableAdvertising        (NSpGameReference         inGame,
  395.                                  NSpProtocolReference     inProtocol,
  396.                                  Boolean                 inEnable);
  397.  
  398. EXTERN_API_C( OSStatus )
  399. NSpGame_Dispose                    (NSpGameReference         inGame,
  400.                                  NSpFlags                 inFlags);
  401.  
  402. EXTERN_API_C( OSStatus )
  403. NSpGame_GetInfo                    (NSpGameReference         inGame,
  404.                                  NSpGameInfo *            ioInfo);
  405.  
  406. /**************************  Messaging  **************************/
  407. EXTERN_API_C( OSStatus )
  408. NSpMessage_Send                    (NSpGameReference         inGame,
  409.                                  NSpMessageHeader *        inMessage,
  410.                                  NSpFlags                 inFlags);
  411.  
  412. EXTERN_API_C( NSpMessageHeader *)
  413. NSpMessage_Get                    (NSpGameReference         inGame);
  414.  
  415. EXTERN_API_C( void )
  416. NSpMessage_Release                (NSpGameReference         inGame,
  417.                                  NSpMessageHeader *        inMessage);
  418.  
  419. /* Helpers */
  420. EXTERN_API_C( OSStatus )
  421. NSpMessage_SendTo                (NSpGameReference         inGame,
  422.                                  NSpPlayerID             inTo,
  423.                                  SInt32                 inWhat,
  424.                                  void *                    inData,
  425.                                  UInt32                 inDataLen,
  426.                                  NSpFlags                 inFlags);
  427.  
  428.  
  429. /*********************  Player Information  **********************/
  430. EXTERN_API_C( NSpPlayerID )
  431. NSpPlayer_GetMyID                (NSpGameReference         inGame);
  432.  
  433. EXTERN_API_C( OSStatus )
  434. NSpPlayer_GetInfo                (NSpGameReference         inGame,
  435.                                  NSpPlayerID             inPlayerID,
  436.                                  NSpPlayerInfoPtr *        outInfo);
  437.  
  438. EXTERN_API_C( void )
  439. NSpPlayer_ReleaseInfo            (NSpGameReference         inGame,
  440.                                  NSpPlayerInfoPtr         inInfo);
  441.  
  442. EXTERN_API_C( OSStatus )
  443. NSpPlayer_GetEnumeration        (NSpGameReference         inGame,
  444.                                  NSpPlayerEnumerationPtr * outPlayers);
  445.  
  446. EXTERN_API_C( void )
  447. NSpPlayer_ReleaseEnumeration    (NSpGameReference         inGame,
  448.                                  NSpPlayerEnumerationPtr  inPlayers);
  449.  
  450. EXTERN_API_C( UInt32 )
  451. NSpPlayer_GetRoundTripTime        (NSpGameReference         inGame,
  452.                                  NSpPlayerID             inPlayer);
  453.  
  454. EXTERN_API_C( UInt32 )
  455. NSpPlayer_GetThruput            (NSpGameReference         inGame,
  456.                                  NSpPlayerID             inPlayer);
  457.  
  458.  
  459. /*********************  Group Management  **********************/
  460. EXTERN_API_C( OSStatus )
  461. NSpGroup_New                    (NSpGameReference         inGame,
  462.                                  NSpGroupID *            outGroupID);
  463.  
  464. EXTERN_API_C( OSStatus )
  465. NSpGroup_Dispose                (NSpGameReference         inGame,
  466.                                  NSpGroupID             inGroupID);
  467.  
  468. EXTERN_API_C( OSStatus )
  469. NSpGroup_AddPlayer                (NSpGameReference         inGame,
  470.                                  NSpGroupID             inGroupID,
  471.                                  NSpPlayerID             inPlayerID);
  472.  
  473. EXTERN_API_C( OSStatus )
  474. NSpGroup_RemovePlayer            (NSpGameReference         inGame,
  475.                                  NSpGroupID             inGroupID,
  476.                                  NSpPlayerID             inPlayerID);
  477.  
  478. EXTERN_API_C( OSStatus )
  479. NSpGroup_GetInfo                (NSpGameReference         inGame,
  480.                                  NSpGroupID             inGroupID,
  481.                                  NSpGroupInfoPtr *        outInfo);
  482.  
  483. EXTERN_API_C( void )
  484. NSpGroup_ReleaseInfo            (NSpGameReference         inGame,
  485.                                  NSpGroupInfoPtr         inInfo);
  486.  
  487. EXTERN_API_C( OSStatus )
  488. NSpGroup_GetEnumeration            (NSpGameReference         inGame,
  489.                                  NSpGroupEnumerationPtr * outGroups);
  490.  
  491. EXTERN_API_C( void )
  492. NSpGroup_ReleaseEnumeration        (NSpGameReference         inGame,
  493.                                  NSpGroupEnumerationPtr  inGroups);
  494.  
  495.  
  496. /**************************  Utilities  ***************************/
  497. EXTERN_API_C( NumVersion )
  498. NSpGetVersion                    (void);
  499.  
  500. EXTERN_API_C( void )
  501. NSpClearMessageHeader            (NSpMessageHeader *        inMessage);
  502.  
  503. EXTERN_API_C( UInt32 )
  504. NSpGetCurrentTimeStamp            (NSpGameReference         inGame);
  505.  
  506. EXTERN_API_C( NSpAddressReference )
  507. NSpConvertOTAddrToAddressReference (OTAddress *            inAddress);
  508.  
  509. EXTERN_API_C( OTAddress *)
  510. NSpConvertAddressReferenceToOTAddr (NSpAddressReference  inAddress);
  511.  
  512. EXTERN_API_C( void )
  513. NSpReleaseAddressReference        (NSpAddressReference     inAddress);
  514.  
  515.  
  516. /************************ Advanced/Async routines ****************/
  517. typedef CALLBACK_API( void , NSpCallbackProcPtr )(NSpGameReference inGame, void *inContext, NSpEventCode inCode, OSStatus inStatus, void *inCookie);
  518. EXTERN_API_C( OSStatus )
  519. NSpInstallCallbackHandler        (NSpCallbackProcPtr     inHandler,
  520.                                  void *                    inContext);
  521.  
  522.  
  523. typedef CALLBACK_API( Boolean , NSpJoinRequestHandlerProcPtr )(NSpGameReference inGame, NSpJoinRequestMessage *inMessage, void *inContext, Str255 outReason);
  524. EXTERN_API_C( OSStatus )
  525. NSpInstallJoinRequestHandler    (NSpJoinRequestHandlerProcPtr  inHandler,
  526.                                  void *                    inContext);
  527.  
  528.  
  529. typedef CALLBACK_API( Boolean , NSpMessageHandlerProcPtr )(NSpGameReference inGame, NSpMessageHeader *inMessage, void *inContext);
  530. EXTERN_API_C( OSStatus )
  531. NSpInstallAsyncMessageHandler    (NSpMessageHandlerProcPtr  inHandler,
  532.                                  void *                    inContext);
  533.  
  534.  
  535.  
  536. #if PRAGMA_STRUCT_ALIGN
  537.     #pragma options align=reset
  538. #elif PRAGMA_STRUCT_PACKPUSH
  539.     #pragma pack(pop)
  540. #elif PRAGMA_STRUCT_PACK
  541.     #pragma pack()
  542. #endif
  543.  
  544. #ifdef PRAGMA_IMPORT_OFF
  545. #pragma import off
  546. #elif PRAGMA_IMPORT
  547. #pragma import reset
  548. #endif
  549.  
  550. #ifdef __cplusplus
  551. }
  552. #endif
  553.  
  554. #endif /* __NETSPROCKET__ */
  555.  
  556.